/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package grafico;

import javax.swing.JFrame;
import observer.Observador;
import org.jfree.chart.ChartPanel;

/**
 *
 * @author Kdc
 */
public abstract class GerarGrafico implements Observador {

    private JFrame janela;

    public abstract ChartPanel getGrafico();

    public void plotarGrafico() {
        ChartPanel painel = this.getGrafico();
        janela.add(painel);
        janela.setExtendedState(JFrame.MAXIMIZED_BOTH);
        janela.setVisible(true);
    }

    public JFrame getJanela() {
        return janela;
    }

    public void setJanela(JFrame janela) {
        this.janela = janela;
    }

}
